unit oFrameGeneratorData;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, StdCtrls, oManager, oGeneratorData;

type
  TframeGeneratorData = class(TFrame)
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit4: TEdit;
    Label4: TLabel;
    cancel: TButton;
    save: TButton;
    procedure cancelClick(Sender: TObject);
    procedure saveClick(Sender: TObject);
  private
    aMaster : TManager;
    aEditing : boolean;
    aType : word;
  public
    constructor Create(paMaster : TManager);
    property pType : word read aType write aType;
    property Editing : boolean read aEditing write aEditing;
    property Master : TMAnager read aMaster write aMaster;
  end;

implementation

{$R *.dfm}

{procedure TframeGeneratorData.Button2Click(Sender: TObject); //OK
  var pom, pom2 : double;
      gen : TGeneratorData ;
begin
  case pType of
   1 : if TryStrToFloat(Edit1.Text,pom) AND TryStrToFloat(Edit2.Text,pom2) then begin
         if (pom >= 0) and (pom2 >= 0) then begin
           Gen := TGeneratorData.Create(genGamma,pom,pom2,CheckBox1.Checked);

           //CheckBox1.Checked
         end
         else Showmessage('Zaporne cislo0');
       end
       else begin
         Showmessage('Nepis ..oviny');
       end;
   2 :
  end;
end;    }

procedure TframeGeneratorData.cancelClick(Sender: TObject);
begin
  Visible := false;
end;

constructor TframeGeneratorData.Create(paMaster: TManager);
begin
  aMaster := paMaster;
end;

procedure TframeGeneratorData.saveClick(Sender: TObject);
begin
  Hide;
end;

end.
